{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pylab as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import random\n",
    "import time\n",
    "import gym\n",
    "from gym import wrappers\n",
    "\n",
    "def run_episode(env, policy, episode_len=100):\n",
    "    total_reward = 0\n",
    "    obs = env.reset()\n",
    "    for t in range(episode_len):\n",
    "        # env.render()\n",
    "        action = policy[obs]\n",
    "        obs, reward, done, _ = env.step(action)\n",
    "        total_reward += reward\n",
    "        if done:\n",
    "            # print('Epside finished after {} timesteps.'.format(t+1))\n",
    "            break\n",
    "    return total_reward\n",
    "\n",
    "\n",
    "def evaluate_policy(env, policy, n_episodes=100):\n",
    "    total_rewards = 0.0\n",
    "    for _ in range(n_episodes):\n",
    "        total_rewards += run_episode(env, policy)\n",
    "    return total_rewards / n_episodes\n",
    "\n",
    "def gen_random_policy():\n",
    "    return np.random.choice(4, size=((16)))\n",
    "\n",
    "def crossover(policy1, policy2):\n",
    "    new_policy = policy1.copy()\n",
    "    for i in range(16):\n",
    "        rand = np.random.uniform()\n",
    "        if rand > 0.5:\n",
    "            new_policy[i] = policy2[i]\n",
    "    return new_policy\n",
    "\n",
    "def mutation(policy, p):\n",
    "    new_policy = policy.copy()\n",
    "    for i in range(16):\n",
    "        rand = np.random.uniform()\n",
    "        if rand < p:\n",
    "            new_policy[i] = np.random.choice(4)\n",
    "    return new_policy\n",
    "\n",
    "def run(n_steps):\n",
    "    random.seed(1234)\n",
    "    np.random.seed(1234)\n",
    "    env = gym.make('FrozenLake-v0')\n",
    "    env.seed(0)\n",
    "    # env = wrappers.Monitor(env, '/tmp/frozenlake1', force=True)\n",
    "    ## Policy search\n",
    "    p_mut = 0.05 \n",
    "    n_policy = 30\n",
    "    start = time.time()\n",
    "    policy_pop = [gen_random_policy() for _ in range(n_policy)]\n",
    "    for idx in range(n_steps):\n",
    "        policy_scores = [evaluate_policy(env, p) for p in policy_pop]\n",
    "        print('Generation %d : max score = %0.2f' %(idx+1, max(policy_scores)))\n",
    "        policy_ranks = list(reversed(np.argsort(policy_scores)))\n",
    "        elite_set = [policy_pop[x] for x in policy_ranks[:5]] #take the 5 best policy\n",
    "        select_probs = np.array(policy_scores) / np.sum(policy_scores)\n",
    "        child_set = [crossover(\n",
    "            policy_pop[np.random.choice(range(n_policy), p=select_probs)], \n",
    "            policy_pop[np.random.choice(range(n_policy), p=select_probs)])\n",
    "            for _ in range(n_policy - 5)]\n",
    "        mutated_list = [mutation(p, p_mut) for p in child_set]\n",
    "        policy_pop = elite_set\n",
    "        policy_pop += mutated_list\n",
    "    policy_score = [evaluate_policy(env, p) for p in policy_pop]\n",
    "    best_policy = policy_pop[np.argmax(policy_score)]\n",
    "\n",
    "    end = time.time()\n",
    "    print('Best policy score = %0.2f. Time taken = %4.4f'\n",
    "            %(np.max(policy_score), (end-start)))    \n",
    "    return np.max(policy_score)\n",
    "    ## Evaluation\n",
    "   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Generation 1 : max score = 0.20\n",
      "Generation 2 : max score = 0.28\n",
      "Generation 3 : max score = 0.39\n",
      "Generation 4 : max score = 0.44\n",
      "Generation 5 : max score = 0.71\n",
      "Generation 6 : max score = 0.68\n",
      "Generation 7 : max score = 0.76\n",
      "Generation 8 : max score = 0.82\n",
      "Generation 9 : max score = 0.84\n",
      "Generation 10 : max score = 0.82\n",
      "Best policy score = 0.81. Time taken = 22.0112\n",
      "Generation 1 : max score = 0.20\n",
      "Generation 2 : max score = 0.30\n",
      "Generation 3 : max score = 0.60\n",
      "Generation 4 : max score = 0.66\n",
      "Generation 5 : max score = 0.79\n",
      "Generation 6 : max score = 0.84\n",
      "Generation 7 : max score = 0.80\n",
      "Generation 8 : max score = 0.78\n",
      "Generation 9 : max score = 0.79\n",
      "Generation 10 : max score = 0.80\n",
      "Best policy score = 0.80. Time taken = 23.2051\n",
      "Generation 1 : max score = 0.20\n",
      "Generation 2 : max score = 0.22\n",
      "Generation 3 : max score = 0.44\n",
      "Generation 4 : max score = 0.51\n",
      "Generation 5 : max score = 0.74\n",
      "Generation 6 : max score = 0.72\n",
      "Generation 7 : max score = 0.78\n",
      "Generation 8 : max score = 0.73\n",
      "Generation 9 : max score = 0.86\n",
      "Generation 10 : max score = 0.81\n",
      "Best policy score = 0.81. Time taken = 20.8751\n",
      "Generation 1 : max score = 0.20\n",
      "Generation 2 : max score = 0.37\n",
      "Generation 3 : max score = 0.47\n",
      "Generation 4 : max score = 0.62\n",
      "Generation 5 : max score = 0.67\n",
      "Generation 6 : max score = 0.69\n",
      "Generation 7 : max score = 0.74\n",
      "Generation 8 : max score = 0.77\n",
      "Generation 9 : max score = 0.76\n",
      "Generation 10 : max score = 0.78\n",
      "Best policy score = 0.77. Time taken = 18.5584\n",
      "Generation 1 : max score = 0.20\n",
      "Generation 2 : max score = 0.23\n",
      "Generation 3 : max score = 0.30\n",
      "Generation 4 : max score = 0.30\n",
      "Generation 5 : max score = 0.55\n",
      "Generation 6 : max score = 0.50\n",
      "Generation 7 : max score = 0.59\n",
      "Generation 8 : max score = 0.73\n",
      "Generation 9 : max score = 0.74\n",
      "Generation 10 : max score = 0.68\n",
      "Best policy score = 0.68. Time taken = 15.0029\n",
      "Generation 1 : max score = 0.20\n",
      "Generation 2 : max score = 0.24\n",
      "Generation 3 : max score = 0.31\n",
      "Generation 4 : max score = 0.36\n",
      "Generation 5 : max score = 0.73\n",
      "Generation 6 : max score = 0.75\n",
      "Generation 7 : max score = 0.76\n",
      "Generation 8 : max score = 0.77\n",
      "Generation 9 : max score = 0.77\n",
      "Generation 10 : max score = 0.77\n",
      "Best policy score = 0.77. Time taken = 15.8816\n",
      "Generation 1 : max score = 0.20\n",
      "Generation 2 : max score = 0.31\n",
      "Generation 3 : max score = 0.43\n",
      "Generation 4 : max score = 0.34\n",
      "Generation 5 : max score = 0.38\n",
      "Generation 6 : max score = 0.69\n",
      "Generation 7 : max score = 0.72\n",
      "Generation 8 : max score = 0.74\n",
      "Generation 9 : max score = 0.76\n",
      "Generation 10 : max score = 0.74\n",
      "Best policy score = 0.69. Time taken = 13.3623\n"
     ]
    }
   ],
   "source": [
    "x = [0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5]\n",
    "y = [run(p) for p in x]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEICAYAAACzliQjAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xl8VPW9//HXZ7KSkIQtrNkhQVYRw04AFaxaC7ZWBeuCLLGtdrH23vb2drHetvf+2luxVXs1gCAqIFprsa4gKPsSEFRAIGQhYQ1LICRAtu/vjznoGLJMwkzOLJ/n4zEPZs58Z+ZzmOQ935xz5nPEGINSSqng4LC7AKWUUm1HQ18ppYKIhr5SSgURDX2llAoiGvpKKRVENPSVUiqIaOirgCciE0SkpJWPTRERIyKhjdz/CxGZ19BYEXlHRO5vfeUtqvN3InJCRI62xetdKRHZJSIT7K4jGGno+wkRGSsiG0TkjIicEpH1IjLMxnpGiUiFiMQ0cN/HIvKwHXW1NWPMH4wxsxq572ZjzAsAIjJdRNZ5owYRSQQeBfobY7p74zXqvV6hiExswfiFIvI712XGmAHGmA89Xpxqloa+HxCRWOBfwFNAJ6AX8FvgoodfJ8TdscaYjUAJcHu95xgI9AeWeLK2pjQ2Cw8iycBJY8xxuwtRfsAYoxcfvwCZQFkzY2YDe4ByYDcw1FreD/gQKAN2AZNdHrMQ+D/gbaACmAhEAP8LHAS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ElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(x, y)\n",
    "plt.title(\"Score Vs. probability of mutation\")\n",
    "plt.savefig(\"p_mutation\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Generation 1 : max score = 0.04\n",
      "Generation 2 : max score = 0.11\n",
      "Generation 3 : max score = 0.10\n",
      "Generation 4 : max score = 0.11\n",
      "Generation 5 : max score = 0.31\n",
      "Generation 6 : max score = 0.21\n",
      "Generation 7 : max score = 0.44\n",
      "Generation 8 : max score = 0.37\n",
      "Generation 9 : max score = 0.51\n",
      "Generation 10 : max score = 0.51\n",
      "Best policy score = 0.56. Time taken = 1.7074\n",
      "Generation 1 : max score = 0.12\n",
      "Generation 2 : max score = 0.14\n",
      "Generation 3 : max score = 0.22\n",
      "Generation 4 : max score = 0.19\n",
      "Generation 5 : max score = 0.23\n",
      "Generation 6 : max score = 0.19\n",
      "Generation 7 : max score = 0.32\n",
      "Generation 8 : max score = 0.35\n",
      "Generation 9 : max score = 0.42\n",
      "Generation 10 : max score = 0.40\n",
      "Best policy score = 0.55. Time taken = 2.8304\n",
      "Generation 1 : max score = 0.12\n",
      "Generation 2 : max score = 0.15\n",
      "Generation 3 : max score = 0.16\n",
      "Generation 4 : max score = 0.29\n",
      "Generation 5 : max score = 0.72\n",
      "Generation 6 : max score = 0.79\n",
      "Generation 7 : max score = 0.76\n",
      "Generation 8 : max score = 0.78\n",
      "Generation 9 : max score = 0.80\n",
      "Generation 10 : max score = 0.79\n",
      "Best policy score = 0.80. Time taken = 6.9624\n",
      "Generation 1 : max score = 0.15\n",
      "Generation 2 : max score = 0.48\n",
      "Generation 3 : max score = 0.44\n",
      "Generation 4 : max score = 0.65\n",
      "Generation 5 : max score = 0.63\n",
      "Generation 6 : max score = 0.78\n",
      "Generation 7 : max score = 0.80\n",
      "Generation 8 : max score = 0.79\n",
      "Generation 9 : max score = 0.81\n",
      "Generation 10 : max score = 0.77\n",
      "Best policy score = 0.77. Time taken = 9.7759\n",
      "Generation 1 : max score = 0.15\n",
      "Generation 2 : max score = 0.19\n",
      "Generation 3 : max score = 0.22\n",
      "Generation 4 : max score = 0.30\n",
      "Generation 5 : max score = 0.36\n",
      "Generation 6 : max score = 0.68\n",
      "Generation 7 : max score = 0.71\n",
      "Generation 8 : max score = 0.75\n",
      "Generation 9 : max score = 0.78\n",
      "Generation 10 : max score = 0.79\n",
      "Best policy score = 0.82. Time taken = 10.4979\n",
      "Generation 1 : max score = 0.20\n",
      "Generation 2 : max score = 0.24\n",
      "Generation 3 : max score = 0.43\n",
      "Generation 4 : max score = 0.49\n",
      "Generation 5 : max score = 0.57\n",
      "Generation 6 : max score = 0.79\n",
      "Generation 7 : max score = 0.81\n",
      "Generation 8 : max score = 0.79\n",
      "Generation 9 : max score = 0.83\n",
      "Generation 10 : max score = 0.80\n",
      "Best policy score = 0.80. Time taken = 12.8866\n",
      "Generation 1 : max score = 0.20\n",
      "Generation 2 : max score = 0.25\n",
      "Generation 3 : max score = 0.29\n",
      "Generation 4 : max score = 0.60\n",
      "Generation 5 : max score = 0.67\n",
      "Generation 6 : max score = 0.76\n",
      "Generation 7 : max score = 0.75\n",
      "Generation 8 : max score = 0.83\n",
      "Generation 9 : max score = 0.82\n",
      "Generation 10 : max score = 0.77\n",
      "Best policy score = 0.84. Time taken = 16.0740\n",
      "Generation 1 : max score = 0.20\n",
      "Generation 2 : max score = 0.52\n",
      "Generation 3 : max score = 0.52\n",
      "Generation 4 : max score = 0.72\n",
      "Generation 5 : max score = 0.74\n",
      "Generation 6 : max score = 0.78\n",
      "Generation 7 : max score = 0.79\n",
      "Generation 8 : max score = 0.79\n",
      "Generation 9 : max score = 0.77\n",
      "Generation 10 : max score = 0.84\n",
      "Best policy score = 0.78. Time taken = 20.3716\n",
      "Generation 1 : max score = 0.20\n",
      "Generation 2 : max score = 0.19\n",
      "Generation 3 : max score = 0.68\n",
      "Generation 4 : max score = 0.71\n",
      "Generation 5 : max score = 0.69\n",
      "Generation 6 : max score = 0.77\n",
      "Generation 7 : max score = 0.80\n",
      "Generation 8 : max score = 0.77\n",
      "Generation 9 : max score = 0.77\n",
      "Generation 10 : max score = 0.77\n",
      "Best policy score = 0.78. Time taken = 20.5122\n",
      "Generation 1 : max score = 0.20\n",
      "Generation 2 : max score = 0.30\n",
      "Generation 3 : max score = 0.60\n",
      "Generation 4 : max score = 0.66\n",
      "Generation 5 : max score = 0.79\n",
      "Generation 6 : max score = 0.84\n",
      "Generation 7 : max score = 0.80\n",
      "Generation 8 : max score = 0.78\n",
      "Generation 9 : max score = 0.79\n",
      "Generation 10 : max score = 0.80\n",
      "Best policy score = 0.80. Time taken = 24.7479\n"
     ]
    }
   ],
   "source": [
    "x1 = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]\n",
    "y1 = [run(n) for n in x1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEICAYAAACzliQjAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xl8FPX9x/HXJwkhHCEcCVcOLrkDooRL8KoXtghWWwXv1qNWUavWVv21imhbe2pbrYrWW0CqFqlSUYvainKEMwn3ZciGU2CTcCbZz++PmeASErI59/o8H499JDvXfnd29j2z3+/Md0RVMcYYEx1igl0AY4wxTcdC3xhjooiFvjHGRBELfWOMiSIW+sYYE0Us9I0xJopY6JuQICJbReT8IL12JxH5r4gUi8gfg1EG03RE5GoR+TD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k3Vjo15OICPB3YI2q/slv1Bzgevf/63Hq+iOaqj6gqmmq2h2ngW6+ql4NfAJ8z50sKtYFgKruALaJSF930HnAaqJw23DlAyNFpKX7valYH1G5ffipbnuYA1znnsUzEvBWVAPVh12RW08iMgb4H5DDN/XYD+LU688CMnA29u+r6t6gFDIIROQc4KeqOk5EeuIc+bcHlgPXqOqRYJavqYjIEOAFIB7YDPwA52ArKrcNEXkEuBLnrLflwE049dRRsX2IyAzgHJwulHcCDwOzqWJ7cHeMT+Gc7XMQ+IGq1vsG4hb6xhgTRax6xxhjooiFvjHGRBELfWOMiSIW+sYYE0Us9I0xJopY6BtjTBSx0DfGmCjy/6P51w1qzDx5AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(x1, y1)\n",
    "plt.title(\"Score Vs. Number of agents per generation\")\n",
    "plt.savefig(\"agent_per_gen\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Best policy score = 0.12. Time taken = 0.2822\n",
      "Generation 1 : max score = 0.12\n",
      "Generation 2 : max score = 0.15\n",
      "Best policy score = 0.16. Time taken = 0.8657\n",
      "Generation 1 : max score = 0.12\n",
      "Generation 2 : max score = 0.15\n",
      "Generation 3 : max score = 0.16\n",
      "Generation 4 : max score = 0.29\n",
      "Best policy score = 0.72. Time taken = 1.5239\n",
      "Generation 1 : max score = 0.12\n",
      "Generation 2 : max score = 0.15\n",
      "Generation 3 : max score = 0.16\n",
      "Generation 4 : max score = 0.29\n",
      "Generation 5 : max score = 0.72\n",
      "Generation 6 : max score = 0.79\n",
      "Best policy score = 0.76. Time taken = 2.8015\n",
      "Generation 1 : max score = 0.12\n",
      "Generation 2 : max score = 0.15\n",
      "Generation 3 : max score = 0.16\n",
      "Generation 4 : max score = 0.29\n",
      "Generation 5 : max score = 0.72\n",
      "Generation 6 : max score = 0.79\n",
      "Generation 7 : max score = 0.76\n",
      "Generation 8 : max score = 0.78\n",
      "Best policy score = 0.80. Time taken = 4.1609\n",
      "Generation 1 : max score = 0.12\n",
      "Generation 2 : max score = 0.15\n",
      "Generation 3 : max score = 0.16\n",
      "Generation 4 : max score = 0.29\n",
      "Generation 5 : max score = 0.72\n",
      "Generation 6 : max score = 0.79\n",
      "Generation 7 : max score = 0.76\n",
      "Generation 8 : max score = 0.78\n",
      "Generation 9 : max score = 0.80\n",
      "Generation 10 : max score = 0.79\n",
      "Best policy score = 0.80. Time taken = 6.6782\n",
      "Generation 1 : max score = 0.12\n",
      "Generation 2 : max score = 0.15\n",
      "Generation 3 : max score = 0.16\n",
      "Generation 4 : max score = 0.29\n",
      "Generation 5 : max score = 0.72\n",
      "Generation 6 : max score = 0.79\n",
      "Generation 7 : max score = 0.76\n",
      "Generation 8 : max score = 0.78\n",
      "Generation 9 : max score = 0.80\n",
      "Generation 10 : max score = 0.79\n",
      "Generation 11 : max score = 0.80\n",
      "Generation 12 : max score = 0.86\n",
      "Best policy score = 0.86. Time taken = 8.2879\n",
      "Generation 1 : max score = 0.12\n",
      "Generation 2 : max score = 0.15\n",
      "Generation 3 : max score = 0.16\n",
      "Generation 4 : max score = 0.29\n",
      "Generation 5 : max score = 0.72\n",
      "Generation 6 : max score = 0.79\n",
      "Generation 7 : max score = 0.76\n",
      "Generation 8 : max score = 0.78\n",
      "Generation 9 : max score = 0.80\n",
      "Generation 10 : max score = 0.79\n",
      "Generation 11 : max score = 0.80\n",
      "Generation 12 : max score = 0.86\n",
      "Generation 13 : max score = 0.86\n",
      "Generation 14 : max score = 0.84\n",
      "Best policy score = 0.79. Time taken = 10.8125\n",
      "Generation 1 : max score = 0.12\n",
      "Generation 2 : max score = 0.15\n",
      "Generation 3 : max score = 0.16\n",
      "Generation 4 : max score = 0.29\n",
      "Generation 5 : max score = 0.72\n",
      "Generation 6 : max score = 0.79\n",
      "Generation 7 : max score = 0.76\n",
      "Generation 8 : max score = 0.78\n",
      "Generation 9 : max score = 0.80\n",
      "Generation 10 : max score = 0.79\n",
      "Generation 11 : max score = 0.80\n",
      "Generation 12 : max score = 0.86\n",
      "Generation 13 : max score = 0.86\n",
      "Generation 14 : max score = 0.84\n",
      "Generation 15 : max score = 0.79\n",
      "Generation 16 : max score = 0.83\n",
      "Best policy score = 0.80. Time taken = 13.5957\n",
      "Generation 1 : max score = 0.12\n",
      "Generation 2 : max score = 0.15\n",
      "Generation 3 : max score = 0.16\n",
      "Generation 4 : max score = 0.29\n",
      "Generation 5 : max score = 0.72\n",
      "Generation 6 : max score = 0.79\n",
      "Generation 7 : max score = 0.76\n",
      "Generation 8 : max score = 0.78\n",
      "Generation 9 : max score = 0.80\n",
      "Generation 10 : max score = 0.79\n",
      "Generation 11 : max score = 0.80\n",
      "Generation 12 : max score = 0.86\n",
      "Generation 13 : max score = 0.86\n",
      "Generation 14 : max score = 0.84\n",
      "Generation 15 : max score = 0.79\n",
      "Generation 16 : max score = 0.83\n",
      "Generation 17 : max score = 0.80\n",
      "Generation 18 : max score = 0.82\n",
      "Best policy score = 0.85. Time taken = 15.9395\n"
     ]
    }
   ],
   "source": [
    "x2 = [i for i in np.arange(0,20,2)]\n",
    "y2 = [run(n) for n in x2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEICAYAAACktLTqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xl8VfWd//HXJ4Gw74SwJGGXTREBcWsttgiirXa6QjedaUuXYaYztTO17Tz8OU6n0zrTaWexi3a1raJ1utCWGtRKr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OP26jOjNOsPHf9D+uYxqm7Lt2X7T5QdERLJQOnfLiIhINyncRUSykMJdRCQLKdxFRLKQwl1EJAsp3EVEspDCXUQkC/1/t2/m82d9kFkAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(x2, y2)\n",
    "plt.title(\"Score Vs. Number of generations\")\n",
    "plt.savefig(\"n_gen\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    " env = wrappers.Monitor(env, '/tmp/frozenlake1', force=True)\n",
    "    for _ in range(200):\n",
    "        run_episode(env, best_policy)\n",
    "    env.close()\n",
    "    gym.upload('/tmp/frozenlake1', api_key=...)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
